<template>
  <div class="header-menu-item" @mouseleave="() => { isShow = false }">
    <a href="javascript:;" class="link iconfont icon-gouwuche" @mouseover="() => { isShow = true }">购物车</a>
    <div class="dorpdown-box left" v-show="isShow">
      <template v-if="isLogin === false">
        您的购物车是空的，<br />登录后可以同步购物车中的商品哦
        <router-link :to="{path: '#'}" class="book-btn">登录</router-link>
      </template>
      <template v-else>
        已登录显示购物车信息
      </template>
    </div>
  </div>
</template>

<script>
import './headerMenuItem.scss'

export default {
  name: 'shopCar',
  data () {
    return {
      isShow: false,
      isLogin: false
    }
  }
}
</script>

<style lang="scss" scoped>
  .dorpdown-box {
    width: 210px;
  }
</style>
